package cn.doitedu.dw.utils;

public class IpInfoBean implements Comparable<IpInfoBean>{

    private long start;
    private long end;
    private String country;
    private String province;

    public IpInfoBean() {
    }

    public IpInfoBean(long start, long end, String country, String province) {
        this.start = start;
        this.end = end;
        this.country = country;
        this.province = province;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }


    @Override
    public int compareTo(IpInfoBean o) {

        if(this.start > o.end) return 1;
        if(this.end < o.start) return -1;
        return 0;
    }
}
